/**
 * 出具《福建省动物、动物产品准调证》申请单 审批
 * @constructor
 */
function AnimalAproval() {
}

AnimalAproval.init = function () {
    addSelect();
    loadCities();
    loadCities2();
    $('#tableList').bootstrapTable({
        url: '/animalApplication/tableSearch',
        method: 'post',
        striped: true, //是否显示行间隔色
        toolbar: "#toolbar",
        sidePagination: "true",
        dataField: "data",//这是返回的json数组的key.默认是"rows".这里只有前后端约定好就行
        showToggle: true, //是否显示详细视图和列表视图的切换按钮
        striped: true, // 是否显示行间隔色
//search : "true",
        uniqueId: "id",
        pageList: [5, 10, 20, 50, 100],//可选择单页记录数
        pageSize: "10",
        pagination: true, // 是否分页
        sortable: true, // 是否启用排序
        sidePagination: 'server', // 设置为服务器端分页     客户端：client
        search: false,
        showColumns: true,
        showRefresh: true,
        showExport: true,
//得到查询的参数
        queryParams: function (params) {
//这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
            var query_params = {
//********table的参数 不变
                pageSize: params.limit,                         //页面大小
                pageIndex: (params.offset / params.limit) + 1,   //页码
                sort: params.sort,      //排序列名
                sortOrder: params.order, //排位命令（desc，asc）
//********
//获取查询的对象，往下加入
                timeInterval: $('#search_ApplicationDate').val(), // 请求时向服务端传递的参数
                types: $('#search_types').val(),
            };
            return query_params;
        },
        columns: [
            {
//field: 'Number',//可不加
                title: '序号',//标题  可不加
                align: "center",
                width: 40,
                formatter: function (value, row, index) {
                    var pageSize = $('#tableList').bootstrapTable('getOptions').pageSize;//通过表的#id 可以得到每页多少条
                    var pageNumber = $('#tableList').bootstrapTable('getOptions').pageNumber;//通过表的#id 可以得到当前第几页
                    return pageSize * (pageNumber - 1) + index + 1;//返回每条的序号： 每页条数 * （当前页 - 1 ）+ 序号
                }
            },
            {field: 'readActivity', title: '是否已阅读温馨提示内容', align: 'center'},
            {field: 'applicationDate', title: '申请日期', align: 'center'},
            {field: 'applicationName', title: '申请单位(或个人）名称', align: 'center'},
            {field: 'enterpriseNo', title: '企业代码(个人身份证号码)', align: 'center'},
            {field: 'phone', title: '联系电话', align: 'center'},
            {
                field: 'licensePhoto', title: '营业执照或身份证照片',align: 'center',width: 200,
                formatter: function (value) {
                    return "<a href='"+value+"' target='_blank'>查看图片</a>";
                    // return "<img src=\"" + value + "\" class=\"img-responsive\">";
                }
            },
            {field: 'fullAddress', title: '发货完整地址', align: 'center'},
            {field: 'company', title: '发货单位', align: 'center'},
            {field: 'fullSaleAddress', title: '销售完整地址', align: 'center'},
            {field: 'receivingUnit', title: '接货单位', align: 'center'},
            {field: 'animalType', title: '动物、动物产品类别', align: 'center'},
            {field: 'number', title: '调运数量(头、公斤、羽)', align: 'center'},
            {field: 'transport', title: '运输方式', align: 'center'},
            {field: 'carry', title: '承运人', align: 'center'},
            {field: 'carryPhone', title: '承运人电话', align: 'center'},
            {field: 'carNo', title: '车号', align: 'center'},
            {field: 'transferTime', title: '拟调入时间', align: 'center'},
            {field: 'purpose', title: '用途', align: 'center'},
            {field: 'route', title: '运输路经省市县名', align: 'center'},
            {
                field: 'reportPhoto', title: '拟调入动物或产品的非洲猪瘟检测报告',align: 'center',width: 200,
                formatter: function (value) {
                    return "<a href='"+value+"' target='_blank'>查看图片</a>";
                    // return "<img src=\"" + value + "\" class=\"img-responsive\">";
                }
            },
            {field: 'remark', title: '备注', align: 'center'},
            {
                field: 'types', title: '审批状态', align: 'center',
                formatter:function (value) {
                    if (value == 0) return "待审";
                    else if (value == 1) return "驳回";
                    else if (value == 2) return "待出证";
                    else if (value == 3) return "已出证";
                }
            },
            {
                title: '操作',
                align: 'center',
                formatter: function (value, row, index) {
                    var optionHtml = "";
                    if (row.types == 0){
                        optionHtml = optionHtml + "<a class=\"btn btn-success btn-xs\"  href=\"javascript:void(0)\"  onclick='actionRecord(" + JSON.stringify(row) + ",\"aproval\")' title=\"审批\" ><i class=\"fa fa-edit\"></i>审批</a>";
                    }else if (row.types == 2){
                        optionHtml = optionHtml + "<a class=\"btn btn-warning btn-xs\"  href=\"javascript:void(0)\"  onclick='actionRecord(" + JSON.stringify(row) + ",\"certificate\")' title=\"出证\" ><i class=\"fa fa-edit\"></i>出证</a>";
                    }
                    optionHtml = optionHtml + "<a class=\"btn btn-info btn-xs\"  href=\"javascript:void(0)\"  onclick='actionRecord(" + JSON.stringify(row) + ",\"show\")' title=\"查看详情\" ><i class=\"fa\"></i>查看详情</a>";
                    return optionHtml;
                }
            }
        ]
    });
}

//值改变事件
function changeAnimal(){
    if($("#text_animalType").val()=="其它"){
        document.getElementById("A").style.display = "block";
        document.getElementById("B").style.display = "block";
    }else {
        document.getElementById("A").style.display = "none";
        document.getElementById("B").style.display = "none";
    }
};
function changePurpose(){
    if($("#text_purpose").val()=="其它"){
        document.getElementById("C").style.display = "block";
        document.getElementById("D").style.display = "block";
    }else {
        document.getElementById("C").style.display = "none";
        document.getElementById("D").style.display = "none";
    }
};
// //时间选择器
// laydate.render({
//     elem: '#search_ApplicationDate',
//     range: true,
// });
//
// laydate.render({
//     elem: '#text_applicationDate',
//     theme: 'molv',
//     type:"date",
// });
// laydate.render({
//     elem: '#text_transferTime',
//     theme: 'molv',
//     type:"date",
// });
//查询方法****************************
function doSearch() {
// $('#tableList').bootstrapTable(('refresh')); // 很重要的一步，刷新url！
    $("#tableList").bootstrapTable("refreshOptions", {pageNumber: 1});
}

//重置****************************
function doRest() {
    $("#search_ApplicationDate").val("");
    $("#search_types").val("");
// $('#tableList').bootstrapTable(('refresh')); // 很重要的一步，刷新url！
    $("#tableList").bootstrapTable("refreshOptions", {pageNumber: 1});
}

//增加方法****************************
var Action = "";
var id = 0;
var pxt = "/animalApplication"; //控制器名称
function addRecord() {
    id = 0;
    Action = "add";
    $("#myform")[0].reset();

}

//增加/修改数据保存****************************
function saveRecord() {
    // if (!validateForm()) return false;
//创建传递的参数
    var postdata = {
        id: id,
        action:Action,
        types:$("#types").val(),
        opinion:$("#opinion").val(),
        witness:$("#witness").val(),
        livestock:$("#livestock").val(),
    };
// console.log(JSON.stringify(postdata));
//发送异步请求到后台保存用户数据
    $.ajax({
        url: pxt + "/action",
        type: "post",
        data: JSON.stringify(postdata),
        contentType: "application/json",
        dataType: "json",
        success: function (data) {
            if (data.code === "200") {
                $('#myModalAdd').modal('hide')
                doSearch();
                swal("操作成功!",data.message, "success");
            }else {
                swal("操作失败!", data.message, "error");
            }
        }
    });
}

//操作相关方法****************************
function actionRecord(data, type) {
    httpReportPhoto=data.reportPhoto;
    httpLicensePhoto=data.licensePhoto;
    if (type == "aproval") { //审批
        id = data.id;
        Action = "aproval";
        $("#myform")[0].reset();
        $("#Aproval").show();
        $("#Certificate").hide();
        $("#save").removeAttr("disabled");
        WriteData(data)
        $('#myModalAdd').modal('show')
    }else if (type == "certificate") { //出证
        id = data.id;
        Action = "certificate";
        $("#myform")[0].reset();
        $("#Aproval").hide();
        $("#Certificate").show();
        $("#save").removeAttr("disabled");
        WriteData(data)
        $('#myModalAdd').modal('show')
    }else if (type == "show"){ //详情
        id = data.id;
        Action = "show";
        $("#myform1")[0].reset();
        WriteData1(data)
        $('#myModalAdd1').modal('show')
    }
}
function WriteData1(data) {
    $("#readActivity").val(data.readActivity);
    $("#applicationDate").val(data.applicationDate);
    $("#applicationName").val(data.applicationName);
    $("#enterpriseNo").val(data.enterpriseNo);
    $("#phone").val(data.phone);
    $("#Image").attr("src",httpLicensePhoto);
    $("#starProvince").val(data.starProvince);
    $("#starCity").val(data.starCity);
    $("#starDistrict").val(data.starDistrict);
    $("#starTownship").val(data.starTownship);
    $("#address").val(data.address);
    $("#company").val(data.company);
    $("#saleDestination").val(data.saleDestination);
    $("#arriveProvince").val(data.arriveProvince);
    $("#arriveCity").val(data.arriveCity);
    $("#arriveDistrict").val(data.arriveDistrict);
    $("#arriveTownship").val(data.arriveTownship);
    $("#receivingUnit").val(data.receivingUnit);
    $("#animalType").val(data.animalType);
    $("#number").val(data.number);
    $("#transport").val(data.transport);
    $("#carry").val(data.carry);
    $("#carryPhone").val(data.carryPhone);
    $("#carNo").val(data.carNo);
    $("#transferTime").val(data.transferTime);
    $("#purpose").val(data.purpose);
    $("#route").val(data.route);
    $("#fullAddress").val(data.fullAddress);
    $("#fullSaleAddress").val(data.fullSaleAddress);
    $("#Image2").attr("src",httpReportPhoto);
    $("#remark").val(data.remark);
    $("#aprovalUser").val(data.aproval);
    $("#aprovalTime").val(data.aprovalTime);
    $("#aprovalOpinion").val(data.opinion);
    $("#certificateUser").val(data.certificate);
    $("#certificateTime").val(data.certificateTime);
    $("#certificateUserName").val(data.witness);
    $("#livestockName").val(data.livestock);
    let types = "";
    if (data.types == 0) types = "待审";
    else if (data.types == 1) types = "驳回";
    else if (data.types == 2) types = "待出证";
    else if (data.types == 3) types = "已出证";
    $("#aprovalType").val(types);
}
//给控件赋值****************************
function WriteData(data) {
    $("#text_readActivity").val(data.readActivity);
    $("#text_applicationDate").val(data.applicationDate);
    $("#text_applicationName").val(data.applicationName);
    $("#text_enterpriseNo").val(data.enterpriseNo);
    $("#text_phone").val(data.phone);
    var strs=data.licensePhoto.split("/");
    var str=strs[strs.length-1];
    licensePhoto=str;
    document.getElementById("showImage").style.display = "block";
    $("#showImage").attr("src",httpLicensePhoto);

    $("#text_starProvince").val(data.starProvince);
    $("#text_starCity").val(data.starCity);
    $("#text_starDistrict").val(data.starDistrict);
    $("#text_starTownship").val(data.starTownship);

    $("#text_address").val(data.address);
    $("#text_company").val(data.company);
    $("#text_saleDestination").val(data.saleDestination);

    $("#text_arriveProvince").val(data.arriveProvince);
    $("#text_arriveCity").val(data.arriveCity);
    $("#text_arriveDistrict").val(data.arriveDistrict);
    $("#text_arriveTownship").val(data.arriveTownship);

    $("#text_receivingUnit").val(data.receivingUnit);
    $("#text_animalType").val(data.animalType);
    $("#text_number").val(data.number);
    $("#text_transport").val(data.transport);
    $("#text_carry").val(data.carry);
    $("#text_carryPhone").val(data.carryPhone);
    $("#text_carNo").val(data.carNo);
    $("#text_transferTime").val(data.transferTime);
    $("#text_purpose").val(data.purpose);
    $("#text_route").val(data.route);
    $("#text_fullAddress").val(data.fullAddress);
    $("#text_fullSaleAddress").val(data.fullSaleAddress);
    var strs2=data.reportPhoto.split("/");
    var str2=strs2[strs2.length-1];
    reportPhoto=str2;
    document.getElementById("showImage2").style.display = "block";
    $("#showImage2").attr("src",httpReportPhoto);
    $("#text_remark").val(data.remark);
}
var licensePhoto="";//营业执照或身份证照片
var httpLicensePhoto="" //营业执照或身份证照片完整路径
//上传****************************
function ImportShipmentStatusList() {
    console.log("进入图片上传方法")
    var upname = "text_licensePhoto";
    if ($("#" + upname).val() == "") {
        alert("请选择上传图片");
        return;
    }
    $.ajaxFileUpload({
        url: pxt+'/uploadImages',
        secureuri: false,
        fileElementId: upname,
        dataType: 'json',
        success: function (data, status) {
            licensePhoto = data.url;
            //隐藏文件选择
            $("#uploadImages").css("display","none");
            //图片回显
            $("#showImage").css("display","");
            $("#showImage").attr("src",data.httpUrl);
        },
        error: function (data, status, e) {
            console.log("上传图片失败",e);
        }
    });
}
var reportPhoto="";//非洲猪瘟检测报告
var httpReportPhoto="" //非洲猪瘟检测报告完整路径
//上传****************************
function ImportShipmentStatusList2() {
    console.log("进入图片上传方法")
    var upname = "text_reportPhoto";
    if ($("#" + upname).val() == "") {
        alert("请选择上传图片");
        return;
    }
    $.ajaxFileUpload({
        url: pxt+'/uploadImages',
        secureuri: false,
        fileElementId: upname,
        dataType: 'json',
        success: function (data, status) {
            reportPhoto = data.url;
            //隐藏文件选择
            $("#uploadImages").css("display","none");
            //图片回显
            $("#showImage2").css("display","");
            $("#showImage2").attr("src",data.httpUrl);
        },
        error: function (data, status, e) {
            console.log("上传图片失败",e);
        }
    });
}
//起运城市三级联动**************************
function loadCities() {
    $.ajax({
        url: "/city/tableSearch",
        type:"post",
        data:JSON.stringify({pageSize: 100}),
        contentType:"application/json",
        dataType:"json",
        success:function(data){
            initCitySelect(data.data);
            if(data.data[0]){
                loadDistricts(data.data[0].city_id)
            }
        }
    });
}


function loadDistricts(city) {
    $.ajax({
        url: "/district/tableSearch",
        type:"post",
        data:JSON.stringify({city_id:$(city).val(),pageSize: 100}),
        contentType:"application/json",
        dataType:"json",
        success:function(data){
            initDistrictSelect(data.data);
            if(data.data[0]){
                loadTowns(data.data[0].district_id)
            }
        }
    });
}


function loadTowns(district) {
    $.ajax({
        url: "/town/tableSearch",
        type:"post",
        data:JSON.stringify({district_id:$(district).val(),pageSize: 100}),
        contentType:"application/json",
        dataType:"json",
        success:function(data){
            initTownSelect(data.data);
        }
    });
}

function initCitySelect(data) {
    $('#text_starCity').empty();
    $.each(data,function (index,item) {
        $('#text_starCity').append("<option value='"+item.city_id+"'>"+item.city_name+"</option>");
    })
}

function initDistrictSelect(data) {
    $('#text_starDistrict').empty();
    $.each(data,function (index,item) {
        $('#text_starDistrict').append("<option value='"+item.district_id+"'>"+item.district_name+"</option>");
    })
}

function initTownSelect(data) {
    $('#text_starTownship').empty();
    $.each(data,function (index,item) {
        $('#text_starTownship').append("<option value='"+item.town_id+"'>"+item.town__name+"</option>");
    })
}
//到达城市三级联动**************************
function loadCities2() {
    $.ajax({
        url: "/city/tableSearch",
        type:"post",
        data:JSON.stringify({pageSize: 100}),
        contentType:"application/json",
        dataType:"json",
        success:function(data){
            initCitySelect2(data.data);
            if(data.data[0]){
                loadDistricts2(data.data[0].city_id)
            }
        }
    });
}


function loadDistricts2(city) {
    $.ajax({
        url: "/district/tableSearch",
        type:"post",
        data:JSON.stringify({city_id:$(city).val(),pageSize: 100}),
        contentType:"application/json",
        dataType:"json",
        success:function(data){
            initDistrictSelect2(data.data);
            if(data.data[0]){
                loadTowns2(data.data[0].district_id)
            }
        }
    });
}


function loadTowns2(district) {
    $.ajax({
        url: "/town/tableSearch",
        type:"post",
        data:JSON.stringify({district_id:$(district).val(),pageSize: 100}),
        contentType:"application/json",
        dataType:"json",
        success:function(data){
            initTownSelect2(data.data);
        }
    });
}

function initCitySelect2(data) {
    $('#text_arriveCity').empty();
    $.each(data,function (index,item) {
        $('#text_arriveCity').append("<option value='"+item.city_id+"'>"+item.city_name+"</option>");
    })
}

function initDistrictSelect2(data) {
    $('#text_arriveDistrict').empty();
    $.each(data,function (index,item) {
        $('#text_arriveDistrict').append("<option value='"+item.district_id+"'>"+item.district_name+"</option>");
    })
}

function initTownSelect2(data) {
    $('#text_arriveTownship').empty();
    $.each(data,function (index,item) {
        $('#text_arriveTownship').append("<option value='"+item.town_id+"'>"+item.town__name+"</option>");
    })
}

$("#types").change(function () {
    addSelect();
});

//给下拉选赋值*****************************
function addSelect() {
    let type = $("#types").val();
    if (type == 2)
        type = 0;
    else
        type = 1;
    $.ajax({
        type: "get",
        url: "/approvalOpinion/selectByType?type="+type,
        dataType: "json",
        contentType: "application/json",
        success: function (data, status) {
            if (data.code == "200") {
                $("#opinion").empty();
                $.each(data.data,function (i,v) {
                    $("#opinion").append("<option value=\""+v.approvalOpinion+"\">"+v.approvalOpinion+"</option>");
                })
            }
        }
    });
}
//表单验证*****************************
// function validateForm() {
// //validate方法参数可选
//     return $("#myform").validate({
//         rules: {
//
//             text_readActivity: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_applicationDate: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_applicationName: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_enterpriseNo: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_phone: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_address: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_company: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_saleDestination: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_receivingUnit: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_animalType: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_carry: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_carryPhone: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_carNo: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_transferTime: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_purpose: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_otherAnimal: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_otherPurpose: {
//                 required: true,//必填
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//         },
// //错误信息提示
//         messages: {
//             text_readActivity: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_applicationDate: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_applicationName: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_enterpriseNo: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_phone: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_address: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_company: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_saleDestination: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_receivingUnit: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_animalType: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_carry: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_carryPhone: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_carNo: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_transferTime: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_purpose: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_otherAnimal: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//             text_otherPurpose: {
//                 required: "(必填)",
//                 minlength: 1, //最少1个字符
//                 maxlength: 50,//最多50个字符
//                 // number: true, //必须是数字
//             },
//         },
//     }).form();
//
// }
